import {useDelete, useGet, usePost} from "@/utils/request";

export const testSuccess = () => {
  return useGet<string>('/test/success')
}

export const testError = () => {
  return useGet<string>('/test/success')
}

interface TestPost {
  name: string;
  age: number;
}

export const testData = () => {
  return useGet<TestPost>('/test/data')
}


export const testPost = (data: TestPost) => {
  return usePost<TestPost, TestPost>('/test/post', data)
}

export const testDelete = (id: number) => {
  return useDelete<any, any>('/test/delete', {id})
}
